﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _04类基础
{
    class Program
    {
        static void Main(string[] args)
        {
            //Weapon weapon = new Weapon("54手枪", 6, 6, 100);//创建类的实例
            //初始化成员的另一种方式,要求必须有属性
            Weapon weapon = new Weapon()//无参构造函数
            {
                Name = "M1911",
                MagazineCapacity = 6,
                AmmoNumInMc = 6,
                AttackRange = 100,
                Level = 1,
                FireRate = 0.15f               
            };

        }
    }
}
